﻿using LudeonTK;
using RimWorld;
using System.Collections.Generic;
using Verse;
using Verse.AI;
using Verse.Noise;

namespace RimZombieGirl
{
    public static class DebugActions_Curse
    {
        [DebugAction("ZombieGirl", "Add 50 Curse Value", allowedGameStates = AllowedGameStates.PlayingOnMap)]
        private static void Add50CurseValue()
        {

            var comp = Find.CurrentMap.GetComponent<MapComponent_Curse>();
            if (comp != null)
            {
                comp.AddTargetCurseValue(50);
                Messages.Message($"50 Curse Value (now {comp.GetCurrentCurseValue()}).", MessageTypeDefOf.PositiveEvent, false);
            }
            else
            {
                Messages.Message($"Cur map has no curse comp.", MessageTypeDefOf.RejectInput, false);
            }
        }

        [DebugAction("ZombieGirl", "Clear Curse Value", allowedGameStates = AllowedGameStates.PlayingOnMap)]
        private static void ClearCurseValue()
        {
            var comp = Find.CurrentMap.GetComponent<MapComponent_Curse>();
            if (comp != null)
            {
                comp.SetTargetCurseValue(0);
                Messages.Message($"Curse Value cleared.", MessageTypeDefOf.PositiveEvent, false);
            }
            else
            {
                Messages.Message($"Cur map has no curse comp.", MessageTypeDefOf.RejectInput, false);
            }
        }
    }
}
